package com.mvc.security.model;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;

import com.mvc.framework.model.CompositeKeyAuditableEntity;

@Entity(name = "F_USER_ROLE")
@IdClass(UserRolePK.class)
public class UserRole extends CompositeKeyAuditableEntity {
	@Id
	private Integer userId;
	@Id
	private Integer roleId;
	public Integer getUserId() {
    	return userId;
    }
	public void setUserId(Integer userId) {
    	this.userId = userId;
    }
	public Integer getRoleId() {
    	return roleId;
    }
	public void setRoleId(Integer roleId) {
    	this.roleId = roleId;
    }
}

class UserRolePK implements Serializable {
	private Integer userId;
	private Integer roleId;
	public Integer getUserId() {
    	return userId;
    }
	public void setUserId(Integer userId) {
    	this.userId = userId;
    }
	public Integer getRoleId() {
    	return roleId;
    }
	public void setRoleId(Integer roleId) {
    	this.roleId = roleId;
    }
}